package com.twu.biblioteca;

public class Movie {

    private String name;
    private int year;
    private String director;
    private int rating;

    public Movie(String name, int year, String director, int rating) {
        this.name = name;
        this.year = year;
        this.director = director;
        this.rating = rating;
    }

    public String toString() {

        String returnedString = name + '\t' + year + '\t' + director + '\t';

        if (rating == 0) {
            returnedString += "N/A";
        }
        else {
            returnedString += rating;
        }

        return returnedString;
    }

}